<%@page import="java.util.Date"%>
<%@page import="java.io.ObjectOutputStream"%>
<%@page import="java.io.FileOutputStream"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
%>
<jsp:useBean id="user" class="beans.User" />
<jsp:setProperty name="user" property="*" />
<jsp:setProperty name="user" property="regDate" value="<%= new Date() %>" />
<%
String path = "C:/applications/serialized/user_" + user.getId();
FileOutputStream fos = new FileOutputStream(path);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(user);
oos.close();
%>
